<?php

namespace addons\ykjp;

use app\common\library\Menu;
use think\Addons;

/**
 * 插件
 */
class ykjp extends Addons {

    /**
     * 插件安装方法
     * @return bool
     */
    public function install() {
        $menu = [
                [
                'name' => 'ykjp',
                'title' => '进销存管理',
                'icon' => 'fa fa-file-text-o',
                'remark' => '',
                'sublist' => [
                        [
                        'name' => 'ykjp/information', // 对应后台->权限管理->菜单规则中的->规则,也就是菜单的根目录
                        'title' => '基础信息',
                        'ismenu' => 1,
                        'icon' => 'fa fa-cogs',
                        'sublist' => [
                                [
                                'name' => 'ykjp/information/basisinfo/supplier',
                                'title' => '供应商管理',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/information/basisinfo/supplier/index', 'title' => '查看'],
                                        ['name' => 'ykjp/information/basisinfo/supplier/add', 'title' => '添加'],
                                        ['name' => 'ykjp/information/basisinfo/supplier/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/information/basisinfo/supplier/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/information/basisinfo/supplier/del', 'title' => '删除'],
                                        ['name' => 'ykjp/information/basisinfo/supplier/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/information/basisinfo/supplier/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/information/basisinfo/supplier/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/information/basisinfo/supplier/getsalesman', 'title' => '获取业务员'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/information/basisinfo/partition',
                                'title' => '仓库分区',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/information/basisinfo/partition/getsalesman', 'title' => '获取仓库列表'],
                                        ['name' => 'ykjp/information/basisinfo/partition/index', 'title' => '查看'],
                                        ['name' => 'ykjp/information/basisinfo/partition/add', 'title' => '添加'],
                                        ['name' => 'ykjp/information/basisinfo/partition/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/information/basisinfo/partition/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/information/basisinfo/partition/del', 'title' => '删除'],
                                        ['name' => 'ykjp/information/basisinfo/partition/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/information/basisinfo/partition/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/information/basisinfo/partition/multi', 'title' => '批量更新'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/information/basisinfo/warehouse',
                                'title' => '仓库信息',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/information/basisinfo/warehouse/index', 'title' => '查看'],
                                        ['name' => 'ykjp/information/basisinfo/warehouse/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/information/basisinfo/warehouse/add', 'title' => '添加'],
                                        ['name' => 'ykjp/information/basisinfo/warehouse/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/information/basisinfo/warehouse/del', 'title' => '删除'],
                                        ['name' => 'ykjp/information/basisinfo/warehouse/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/information/basisinfo/warehouse/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/information/basisinfo/warehouse/multi', 'title' => '批量更新'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/information/basisinfo/customerinfo',
                                'title' => '客户信息',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/information/basisinfo/customerinfo/getsalesman', 'title' => '业务员信息'],
                                        ['name' => 'ykjp/information/basisinfo/customerinfo/selectpage', 'title' => '下拉选择'],
                                        ['name' => 'ykjp/information/basisinfo/customerinfo/index', 'title' => '查看'],
                                        ['name' => 'ykjp/information/basisinfo/customerinfo/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/information/basisinfo/customerinfo/add', 'title' => '添加'],
                                        ['name' => 'ykjp/information/basisinfo/customerinfo/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/information/basisinfo/customerinfo/del', 'title' => '删除'],
                                        ['name' => 'ykjp/information/basisinfo/customerinfo/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/information/basisinfo/customerinfo/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/information/basisinfo/customerinfo/multi', 'title' => '批量更新'],
                                ]
                            ]
                        ],
                    ],
                        [
                        'name' => 'ykjp/purchase', // 对应后台->权限管理->菜单规则中的->规则,也就是菜单的根目录
                        'title' => '采购管理',
                        'ismenu' => 1,
                        'icon' => 'fa fa-balance-scale',
                        'sublist' => [
                                [
                                'name' => 'ykjp/purchase/order',
                                'title' => '采购订单',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/purchase/order/index', 'title' => '查看'],
                                        ['name' => 'ykjp/purchase/order/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/purchase/order/add', 'title' => '添加'],
                                        ['name' => 'ykjp/purchase/order/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/purchase/order/del', 'title' => '删除'],
                                        ['name' => 'ykjp/purchase/order/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/purchase/order/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/purchase/order/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/purchase/order/orderdetail', 'title' => '查看订单详情'],
                                        ['name' => 'ykjp/purchase/order/anti', 'title' => '反审核'],
                                        ['name' => 'ykjp/purchase/order/joinstorage', 'title' => '生成入库单'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/purchase/addorder',
                                'title' => '采购录单',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/purchase/addorder/index', 'title' => '查看'],
                                        ['name' => 'ykjp/purchase/addorder/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/purchase/addorder/add', 'title' => '添加'],
                                        ['name' => 'ykjp/purchase/addorder/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/purchase/addorder/del', 'title' => '删除'],
                                        ['name' => 'ykjp/purchase/addorder/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/purchase/addorder/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/purchase/addorder/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/purchase/addorder/getsupperbyid', 'title' => '获取供应商详情'],
                                        ['name' => 'ykjp/purchase/addorder/getproductbyid', 'title' => '获取产品详情'],
                                        ['name' => 'ykjp/purchase/addorder/addpurchase', 'title' => '采购录单'],
                                        ['name' => 'ykjp/purchase/addorder/getwarehouse', 'title' => '获取仓库信息'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/purchase/approval',
                                'title' => '采购审批',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/purchase/approval/index', 'title' => '审批列表'],
                                        ['name' => 'ykjp/purchase/approval/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/purchase/approval/add', 'title' => '添加'],
                                        ['name' => 'ykjp/purchase/approval/del', 'title' => '删除'],
                                        ['name' => 'ykjp/purchase/approval/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/purchase/approval/updatesatus', 'title' => '审批'],
                                        ['name' => 'ykjp/purchase/approval/getsalesman', 'title' => '搜索审批人'],
                                        ['name' => 'ykjp/purchase/approval/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/purchase/approval/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/purchase/approval/restore', 'title' => '还原'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/purchase/storage',
                                'title' => '入库单管理',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/purchase/storage/index', 'title' => '查看'],
                                        ['name' => 'ykjp/purchase/storage/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/purchase/storage/add', 'title' => '添加'],
                                        ['name' => 'ykjp/purchase/storage/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/purchase/storage/del', 'title' => '删除'],
                                        ['name' => 'ykjp/purchase/storage/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/purchase/storage/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/purchase/storage/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/purchase/storage/detail', 'title' => '详情'],
                                        ['name' => 'ykjp/purchase/storage/updatedata', 'title' => '保存'],
                                        ['name' => 'ykjp/purchase/storage/inventory', 'title' => '入库'],
                                        ['name' => 'ykjp/purchase/storage/getwarehouse', 'title' => '获取仓库信息'],
                                        ['name' => 'ykjp/purchase/storage/getsuppro', 'title' => '获取供应商/产品信息'],
                                        ['name' => 'ykjp/purchase/storage/anti', 'title' => '反审批'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/purchase/sto_audit',
                                'title' => '入库审核',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/purchase/sto_audit/index', 'title' => '查看'],
                                        ['name' => 'ykjp/purchase/sto_audit/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/purchase/sto_audit/add', 'title' => '添加'],
                                        ['name' => 'ykjp/purchase/sto_audit/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/purchase/sto_audit/del', 'title' => '删除'],
                                        ['name' => 'ykjp/purchase/sto_audit/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/purchase/sto_audit/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/purchase/sto_audit/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/purchase/sto_audit/approval', 'title' => '审批'],
                                        ['name' => 'ykjp/purchase/sto_audit/detail', 'title' => '详情'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/purchase/retire',
                                'title' => '退货单管理',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/purchase/retire/index', 'title' => '查看'],
                                        ['name' => 'ykjp/purchase/retire/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/purchase/retire/add', 'title' => '添加'],
                                        ['name' => 'ykjp/purchase/retire/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/purchase/retire/del', 'title' => '删除'],
                                        ['name' => 'ykjp/purchase/retire/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/purchase/retire/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/purchase/retire/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/purchase/retire/detail', 'title' => '详情'],
                                        ['name' => 'ykjp/purchase/retire/anti', 'title' => '反审核'],
                                        ['name' => 'ykjp/purchase/retire/confirm', 'title' => '确认退货'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/purchase/ret_review',
                                'title' => '退货审核管理',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/purchase/ret_review/index', 'title' => '查看'],
                                        ['name' => 'ykjp/purchase/ret_review/reviewret', 'title' => '审核'],
                                        ['name' => 'ykjp/purchase/ret_review/detial', 'title' => '详情'],
                                        ['name' => 'ykjp/purchase/ret_review/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/purchase/ret_review/add', 'title' => '添加'],
                                        ['name' => 'ykjp/purchase/ret_review/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/purchase/ret_review/del', 'title' => '删除'],
                                        ['name' => 'ykjp/purchase/ret_review/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/purchase/ret_review/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/purchase/ret_review/multi', 'title' => '批量更新'],
                                ]
                            ],
                        ],
                    ],
                        [
                        'name' => 'ykjp/product', // 对应后台->权限管理->菜单规则中的->规则,也就是菜单的根目录
                        'title' => '商品管理',
                        'ismenu' => 1,
                        'icon' => 'fa fa-shopping-bag',
                        'sublist' => [
                                [
                                'name' => 'ykjp/product/type',
                                'title' => '商品分类',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/product/type/index', 'title' => '查看'],
                                        ['name' => 'ykjp/product/type/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/product/type/add', 'title' => '添加'],
                                        ['name' => 'ykjp/product/type/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/product/type/del', 'title' => '删除'],
                                        ['name' => 'ykjp/product/type/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/product/type/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/product/type/multi', 'title' => '批量更新'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/product/product',
                                'title' => '商品信息',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/product/product/index', 'title' => '查看'],
                                        ['name' => 'ykjp/product/product/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/product/product/add', 'title' => '添加'],
                                        ['name' => 'ykjp/product/product/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/product/product/del', 'title' => '删除'],
                                        ['name' => 'ykjp/product/product/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/product/product/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/product/product/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/product/product/get_type_list', 'title' => '获取商品类型列表'],
                                        ['name' => 'ykjp/product/product/get_type_prop', 'title' => '获取当前商品选择类型的属性'],
                                        ['name' => 'ykjp/product/product/get_unit_list', 'title' => '获取单位列表'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/product/unit',
                                'title' => '商品单位',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/product/unit/index', 'title' => '查看'],
                                        ['name' => 'ykjp/product/unit/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/product/unit/add', 'title' => '添加'],
                                        ['name' => 'ykjp/product/unit/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/product/unit/del', 'title' => '删除'],
                                        ['name' => 'ykjp/product/unit/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/product/unit/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/product/unit/multi', 'title' => '批量更新'],
                                ]
                            ],
                        ],
                    ],
                        [
                        'name' => 'ykjp/inventory', // 对应后台->权限管理->菜单规则中的->规则,也就是菜单的根目录
                        'title' => '库存管理',
                        'ismenu' => 1,
                        'icon' => 'fa fa-archive',
                        'sublist' => [
                                [
                                'name' => 'ykjp/inventory/wp',
                                'title' => '商品库存',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/inventory/wp/index', 'title' => '查看'],
                                        ['name' => 'ykjp/inventory/wp/add', 'title' => '添加'],
                                        ['name' => 'ykjp/inventory/wp/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/inventory/wp/del', 'title' => '删除'],
                                        ['name' => 'ykjp/inventory/wp/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/inventory/wp/getwp', 'title' => '联动获取仓库'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/inventory/statement',
                                'title' => '库存流水',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/inventory/statement/index', 'title' => '查看'],
                                        ['name' => 'ykjp/inventory/statement/add', 'title' => '添加'],
                                        ['name' => 'ykjp/inventory/statement/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/inventory/statement/del', 'title' => '删除'],
                                        ['name' => 'ykjp/inventory/statement/multi', 'title' => '批量更新'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/inventory/procheck',
                                'title' => '盘点单',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/inventory/procheck/index', 'title' => '查看'],
                                        ['name' => 'ykjp/inventory/procheck/add', 'title' => '添加盘点单'],
                                        ['name' => 'ykjp/inventory/procheck/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/inventory/procheck/del', 'title' => '删除'],
                                        ['name' => 'ykjp/inventory/procheck/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/inventory/procheck/warehouse', 'title' => '获取仓库列表'],
                                        ['name' => 'ykjp/inventory/procheck/partition', 'title' => '获取分区列表'],
                                        ['name' => 'ykjp/inventory/procheck/product', 'title' => '获取产品列表'],
                                        ['name' => 'ykjp/inventory/procheck/get_surface_num', 'title' => '获取账面库存'],
                                ]
                            ],
                        ],
                    ],
                        [
                        'name' => 'ykjp/sell', // 对应后台->权限管理->菜单规则中的->规则,也就是菜单的根目录
                        'title' => '销售管理',
                        'ismenu' => 1,
                        'icon' => 'fa fa-list',
                        'sublist' => [
                                [
                                'name' => 'ykjp/sell/sell',
                                'title' => '销售录单',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/sell/sell/index', 'title' => '查看'],
                                        ['name' => 'ykjp/sell/sell/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/sell/sell/add', 'title' => '添加'],
                                        ['name' => 'ykjp/sell/sell/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/sell/sell/del', 'title' => '删除'],
                                        ['name' => 'ykjp/sell/sell/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/sell/sell/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/sell/sell/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/sell/sell/getcustomerbyid', 'title' => '获取客户详情'],
                                        ['name' => 'ykjp/sell/sell/getproductbyid', 'title' => '获取产品详情'],
                                        ['name' => 'ykjp/sell/sell/addsell', 'title' => '销售录单'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/sell/selllist',
                                'title' => '销售单',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/sell/selllist/index', 'title' => '查看'],
                                        ['name' => 'ykjp/sell/selllist/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/sell/selllist/add', 'title' => '添加'],
                                        ['name' => 'ykjp/sell/selllist/edit', 'title' => '编辑销售单'],
                                        ['name' => 'ykjp/sell/selllist/del', 'title' => '删除'],
                                        ['name' => 'ykjp/sell/selllist/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/sell/selllist/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/sell/selllist/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/sell/selllist/detail', 'title' => '查看详情'],
                                        ['name' => 'ykjp/sell/selllist/abandon', 'title' => '作废销售单'],
                                        ['name' => 'ykjp/sell/selllist/anti', 'title' => '反审核'],
                                        ['name' => 'ykjp/sell/selllist/goodsok', 'title' => '确认订单完成'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/sell/sellaudit',
                                'title' => '销售单审批',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/sell/sellaudit/index', 'title' => '查看'],
                                        ['name' => 'ykjp/sell/sellaudit/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/sell/sellaudit/add', 'title' => '添加'],
                                        ['name' => 'ykjp/sell/sellaudit/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/sell/sellaudit/del', 'title' => '删除'],
                                        ['name' => 'ykjp/sell/sellaudit/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/sell/sellaudit/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/sell/sellaudit/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/sell/sellaudit/detail', 'title' => '查看详情'],
                                        ['name' => 'ykjp/sell/sellaudit/audit', 'title' => '审核'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/sell/sellfinancial',
                                'title' => '销售单财务审核',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/sell/sellfinancial/index', 'title' => '查看'],
                                        ['name' => 'ykjp/sell/sellfinancial/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/sell/sellfinancial/add', 'title' => '添加'],
                                        ['name' => 'ykjp/sell/sellfinancial/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/sell/sellfinancial/del', 'title' => '删除'],
                                        ['name' => 'ykjp/sell/sellfinancial/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/sell/sellfinancial/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/sell/sellfinancial/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/sell/sellfinancial/detail', 'title' => '查看详情'],
                                        ['name' => 'ykjp/sell/sellfinancial/audit', 'title' => '审核'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/sell/delivery',
                                'title' => '销售出库单',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/sell/delivery/index', 'title' => '查看'],
                                        ['name' => 'ykjp/sell/delivery/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/sell/delivery/add', 'title' => '添加'],
                                        ['name' => 'ykjp/sell/delivery/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/sell/delivery/del', 'title' => '删除'],
                                        ['name' => 'ykjp/sell/delivery/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/sell/delivery/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/sell/delivery/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/sell/delivery/detail', 'title' => '详情'],
                                        ['name' => 'ykjp/sell/delivery/updatedata', 'title' => '保存'],
                                        ['name' => 'ykjp/sell/delivery/inventory', 'title' => '入库'],
                                        ['name' => 'ykjp/sell/delivery/getwp', 'title' => '获取商品仓库库存列表'],
                                        ['name' => 'ykjp/sell/delivery/getinventorybyid', 'title' => '获取商品仓库库存详情'],
                                        ['name' => 'ykjp/sell/delivery/getwarehouse', 'title' => '获取仓库信息'],
                                        ['name' => 'ykjp/sell/delivery/getsuppro', 'title' => '获取客户列表'],
                                        ['name' => 'ykjp/sell/delivery/getcustomerbyid', 'title' => '获取客户详情'],
                                        ['name' => 'ykjp/sell/delivery/abandon', 'title' => '作废销售出库单'],
                                        ['name' => 'ykjp/sell/delivery/delivery', 'title' => '确认出库'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/sell/delivery_audit',
                                'title' => '销售出库单审核',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/sell/delivery_audit/index', 'title' => '查看'],
                                        ['name' => 'ykjp/sell/delivery_audit/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/sell/delivery_audit/add', 'title' => '添加'],
                                        ['name' => 'ykjp/sell/delivery_audit/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/sell/delivery_audit/del', 'title' => '删除'],
                                        ['name' => 'ykjp/sell/delivery_audit/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/sell/delivery_audit/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/sell/delivery_audit/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/sell/delivery_audit/detail', 'title' => '查看详情页'],
                                        ['name' => 'ykjp/sell/delivery_audit/audit', 'title' => '审核'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/sell/delivery_financial',
                                'title' => '销售出库单财务审核',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/sell/delivery_financial/detail', 'title' => '查看详情页'],
                                        ['name' => 'ykjp/sell/delivery_financial/audit', 'title' => '审核'],
                                        ['name' => 'ykjp/sell/delivery_financial/index', 'title' => '查看'],
                                        ['name' => 'ykjp/sell/delivery_financial/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/sell/delivery_financial/add', 'title' => '添加'],
                                        ['name' => 'ykjp/sell/delivery_financial/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/sell/delivery_financial/del', 'title' => '删除'],
                                        ['name' => 'ykjp/sell/delivery_financial/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/sell/delivery_financial/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/sell/delivery_financial/multi', 'title' => '批量更新'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/sell/sellreturn',
                                'title' => '销售退货单',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/sell/sellreturn/index', 'title' => '查看'],
                                        ['name' => 'ykjp/sell/sellreturn/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/sell/sellreturn/add', 'title' => '添加销售退货单'],
                                        ['name' => 'ykjp/sell/sellreturn/edit', 'title' => '编辑销售退货单'],
                                        ['name' => 'ykjp/sell/sellreturn/del', 'title' => '删除'],
                                        ['name' => 'ykjp/sell/sellreturn/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/sell/sellreturn/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/sell/sellreturn/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/sell/sellreturn/getclist', 'title' => '获取客户列表'],
                                        ['name' => 'ykjp/sell/sellreturn/getselllist', 'title' => '获取销售单列表'],
                                        ['name' => 'ykjp/sell/sellreturn/getwarehouse', 'title' => '获取仓库信息'],
                                        ['name' => 'ykjp/sell/sellreturn/detail', 'title' => '详情'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/sell/returnaudit',
                                'title' => '销售退货单审核',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/sell/returnaudit/index', 'title' => '查看'],
                                        ['name' => 'ykjp/sell/returnaudit/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/sell/returnaudit/add', 'title' => '添加'],
                                        ['name' => 'ykjp/sell/returnaudit/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/sell/returnaudit/del', 'title' => '删除'],
                                        ['name' => 'ykjp/sell/returnaudit/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/sell/returnaudit/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/sell/returnaudit/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/sell/returnaudit/detail', 'title' => '详情'],
                                        ['name' => 'ykjp/sell/returnaudit/approval', 'title' => '审核'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/sell/rfinancial',
                                'title' => '销售退货单仓管审核',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/sell/rfinancial/index', 'title' => '查看'],
                                        ['name' => 'ykjp/sell/rfinancial/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/sell/rfinancial/add', 'title' => '添加'],
                                        ['name' => 'ykjp/sell/rfinancial/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/sell/rfinancial/del', 'title' => '删除'],
                                        ['name' => 'ykjp/sell/rfinancial/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/sell/rfinancial/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/sell/rfinancial/multi', 'title' => '批量更新'],
                                        ['name' => 'ykjp/sell/rfinancial/detail', 'title' => '详情'],
                                        ['name' => 'ykjp/sell/rfinancial/approval', 'title' => '审核'],
                                ]
                            ],
                        ],
                    ],
                        [
                        'name' => 'ykjp/output', // 对应后台->权限管理->菜单规则中的->规则,也就是菜单的根目录
                        'title' => '数据导出',
                        'ismenu' => 1,
                        'icon' => 'fa fa-list',
                        'sublist' => [
                                [
                                'name' => 'ykjp/output/purchase',
                                'title' => '入库数据导出',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/output/purchase/index', 'title' => '查看'],
                                        ['name' => 'ykjp/output/purchase/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/output/purchase/add', 'title' => '添加'],
                                        ['name' => 'ykjp/output/purchase/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/output/purchase/del', 'title' => '删除'],
                                        ['name' => 'ykjp/output/purchase/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/output/purchase/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/output/purchase/multi', 'title' => '批量更新'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/output/sell',
                                'title' => '出库数据导出',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/output/sell/index', 'title' => '查看'],
                                        ['name' => 'ykjp/output/sell/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/output/sell/add', 'title' => '添加'],
                                        ['name' => 'ykjp/output/sell/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/output/sell/del', 'title' => '删除'],
                                        ['name' => 'ykjp/output/sell/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/output/sell/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/output/sell/multi', 'title' => '批量更新'],
                                ]
                            ],
                        ],
                    ],
                        [
                        'name' => 'ykjp/summary', // 对应后台->权限管理->菜单规则中的->规则,也就是菜单的根目录
                        'title' => '数据汇总',
                        'ismenu' => 1,
                        'icon' => 'fa fa-list',
                        'sublist' => [
                                [
                                'name' => 'ykjp/summary/purchase',
                                'title' => '采购汇总',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/summary/purchase/index', 'title' => '查看'],
                                        ['name' => 'ykjp/summary/purchase/supplier', 'title' => '供应商信息'],
                                        ['name' => 'ykjp/summary/purchase/product', 'title' => '产品信息'],
                                        ['name' => 'ykjp/summary/purchase/getwarehose', 'title' => '仓库信息'],
                                        ['name' => 'ykjp/summary/purchase/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/summary/purchase/add', 'title' => '添加'],
                                        ['name' => 'ykjp/summary/purchase/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/summary/purchase/del', 'title' => '删除'],
                                        ['name' => 'ykjp/summary/purchase/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/summary/purchase/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/summary/purchase/multi', 'title' => '批量更新'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/summary/purreturn',
                                'title' => '采购退货汇总',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/summary/purreturn/index', 'title' => '查看'],
                                        ['name' => 'ykjp/summary/purreturn/supplier', 'title' => '供应商信息'],
                                        ['name' => 'ykjp/summary/purreturn/product', 'title' => '产品信息'],
                                        ['name' => 'ykjp/summary/purreturn/getwarehose', 'title' => '仓库信息'],
                                        ['name' => 'ykjp/summary/purreturn/recyclebin', 'title' => '回收站'],
                                        ['name' => 'ykjp/summary/purreturn/add', 'title' => '添加'],
                                        ['name' => 'ykjp/summary/purreturn/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/summary/purreturn/del', 'title' => '删除'],
                                        ['name' => 'ykjp/summary/purreturn/destroy', 'title' => '真实删除'],
                                        ['name' => 'ykjp/summary/purreturn/restore', 'title' => '还原'],
                                        ['name' => 'ykjp/summary/purreturn/multi', 'title' => '批量更新'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/summary/sell',
                                'title' => '销售汇总',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/summary/sell/index', 'title' => '查看'],
                                        ['name' => 'ykjp/summary/sell/product', 'title' => '产品信息'],
                                        ['name' => 'ykjp/summary/sell/getcusinfo', 'title' => '客户信息'],
                                        ['name' => 'ykjp/summary/sell/add', 'title' => '添加'],
                                        ['name' => 'ykjp/summary/sell/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/summary/sell/del', 'title' => '删除'],
                                        ['name' => 'ykjp/summary/sell/multi', 'title' => '批量更新'],
                                ]
                            ],
                                [
                                'name' => 'ykjp/summary/sellreturn',
                                'title' => '销售退货汇总',
                                'remark' => '',
                                'icon' => 'fa fa-circle-o',
                                'sublist' => [
                                        ['name' => 'ykjp/summary/sellreturn/index', 'title' => '查看'],
                                        ['name' => 'ykjp/summary/sellreturn/product', 'title' => '产品信息'],
                                        ['name' => 'ykjp/summary/sellreturn/getcusinfo', 'title' => '客户信息'],
                                        ['name' => 'ykjp/summary/sellreturn/add', 'title' => '添加'],
                                        ['name' => 'ykjp/summary/sellreturn/edit', 'title' => '编辑'],
                                        ['name' => 'ykjp/summary/sellreturn/del', 'title' => '删除'],
                                        ['name' => 'ykjp/summary/sellreturn/multi', 'title' => '批量更新'],
                                ]
                            ],
                        ],
                    ],]]
        ];
        Menu::create($menu); // 本文件开头默认已use app\common\library\Menu;
        return true;
    }

    /**
     * 插件卸载方法
     * @return bool
     */
    public function uninstall() {
        Menu::delete('ykjp');
        return true;
    }

    /**
     * 插件启用方法
     * @return bool
     */
    public function enable() {

        Menu::enable('ykjp');
    }

    /**
     * 插件禁用方法
     * @return bool
     */
    public function disable() {

        Menu::disable('ykjp');
    }

}
